<!Doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
		
		<meta name="author" content="XAS-712">
		
		<title>ESP8266 WiFi搞事工具</title>
		<link rel="stylesheet" href="style.css">
		<script src="js/functions.js"></script>
	</head>
	<body>
				<nav>
		<div onclick="alert('由GitHub.XAS-712汉化制作')">ESP8266无线搞事工具</div>
			<a href="apscan.html">无线接入点</a>
			<a href="stations.html">无线客户端</a>
			<a href="attack.html">搞事</a>
			<a href="settings.html">设置</a>
		</nav>
		
		<div class="container">
			<div class="row">
				<div class="col-12">
					
					<div id="error" class="hide"></div>
					
					<h1 class="header">设置</h1>
					<h2>Wi-Fi</h2>
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="ssid" class="labelFix">网络名</label>
				</div>
				<div class="col-6">
					<input type="text" id="ssid" minlength="1" maxlength="32">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="password" class="labelFix">密码 (<span class="red">至少8位</span>)</label>
				</div>
				<div class="col-6">
					<input type="text" id="password" minlength="8" maxlength="32">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="ssidHidden">隐藏SSID (<span class="red">谨慎使用！</span>)</label>
				</div>
				<div class="col-6">
					<input type="checkbox" name="ssidHidden" id="ssidHidden" value="false">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="apChannel" class="labelFix">信道</label>
				</div>
				<div class="col-6">
					<input type="number" id="apChannel" min="1" max="14">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="apChannel" class="labelFix">MAC</label>
				</div>
				<div class="col-6">
					<input type="text" id="macAp" min="1" max="14">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="randMacAp" class="labelFix">随机MAC</label>
				</div>
				<div class="col-6">
					<input type="checkbox" name="randMacAp" id="randMacAp" value="false">
				</div>
			</div>
			
			
			<div class="row">
				<div class="col-12">
					<h2>接入点扫描</h2>
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="apScanHidden">扫描隐藏的接入点</label>
				</div>
				<div class="col-6">
					<input type="checkbox" name="apScanHidden" id="apScanHidden" value="false">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="multiAPs">选择多个SSID</label>
				</div>
				<div class="col-6">
					<input type="checkbox" name="multiAPs" id="multiAPs" value="false">
				</div>
			</div>
			
			
			<div class="row">
				<div class="col-12">
					<h2>客户端扫描</h2>
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="scanTime" class="labelFix">默认扫描时间</label>
				</div>
				<div class="col-6">
					<input type="number" id="scanTime" min="1" max="255"> s
				</div>
			</div>
			
			
			<div class="row">
				<div class="col-12">
					<h2>搞事</h2>
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="timeout" class="labelFix">超时 (0 = 不超时)</label>
				</div>
				<div class="col-6">
					<input type="number" id="timeout" min="-1" max="65536"> s
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="useLed">启用LED</label>
				</div>
				<div class="col-6">
					<input type="checkbox" id="useLed" value="false">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="ledPin" class="labelFix">LED接口</label>
				</div>
				<div class="col-6">
					<input type="number" id="ledPin" min="0" max="18">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="beaconInterval">1s 信标帧间隔 (默认: 100ms)</label>
				</div>
				<div class="col-6">
					<input type="checkbox" id="beaconInterval" value="false">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="deauthReason" class="labelFix">断开连接原因码</label>
				</div>
				<div class="col-6">
					<input type="number" id="deauthReason" min="1" max="45">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="packetRate" class="labelFix">包速率 (<span class="red">可能导致不稳定!</span>)</label>
				</div>
				<div class="col-6">
					<input type="number" id="packetRate" min="1" max="50"> pkts/s
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="multiAttacks">启用同步攻击</label>
				</div>
				<div class="col-6">
					<input type="checkbox" id="multiAttacks" value="false">
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="macInterval" class="labelFix">MAC更换间隔 (用于 beacons 和 probes)</label>
				</div>
				<div class="col-6">
					<input type="number" id="macInterval" min="0" max="65000">s
				</div>
			</div>
			
			
			<!--
			<div class="row">
				<div class="col-6">
					<label for="channelHop">Channel Hopping</label>
				</div>
				<div class="col-6">
					<input type="checkbox" name="channelHop" id="channelHop" value="false">
				</div>
			</div>
			-->
			<div class="row">
				<div class="col-12">
					<br />
					<button class="red" onclick="resetSettings()">复位</button> 
					<button class="red" onclick="restart()">重启</button> 
					<button class="button-primary right" onclick="saveSettings()">保存</button>
					<br class="clear" />
					<p id="saved"></p>
					<br class="clear" />

					<div id="copyright">
						Version 1.6<br />
						
						
					</div>
						
					<script src="js/settings.js"></script>
				</div>
			</div>
		</div>
	</body>
</html>